package annotation;

/**
 * User: heihaier@xfuweng.com
 * Date: 2015/7/6
 * Time: 11:27
 */
public class Apple extends Fruit {

    @Override
    public void foo() {
        System.out.println( "I'm apple" );
    }

    @Deprecated
    public void test() {

        System.out.println("this is a deprecated method!");
    }

    public static void main(String[] args) {

        Apple a = new Apple();

        a.foo();
        a.test();

        Fruit f = new Fruit();

        f.foo();

        Fruit c = new Apple();

        c.foo();
    }
}
